<?php


namespace Home\Model;
use Think\Model;


/**
 * 作业模型
 * @author 水月居 <singliang@163.com>
 */

class HomeworkModel extends Model {
//Relation
    protected $_validate = array(
        array('week', 'require', '请输入第几周！', self::MUST_VALIDATE),
        array('content', 'require', '作业内容必须！', self::EXISTS_VALIDATE),
        
    );


    public function getName($uid){
        return $this->where(array('uid'=>(int)$uid))->getField('name');
    }

}
